package com.kede.app.service;

import com.kede.app.domain.Operat;
import com.kede.app.service.dto.OperatDto;
import com.kede.app.service.dto.OperatQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @description 服务接口
* @author Pr.li
* @date 2023-08-13
**/
public interface OperatService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(OperatQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<OperatDto>
    */
    List<OperatDto> queryAll(OperatQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return OperatDto
     */
    OperatDto findById(Integer id);

    /**
    * 创建
    * @param resources /
    * @return OperatDto
    */
    OperatDto create(Operat resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(Operat resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Integer[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<OperatDto> all, HttpServletResponse response) throws IOException;

    ResponseEntity buildOwnQCode(@RequestBody Operat operat);


    void downLoadImg(HttpServletRequest request,HttpServletResponse response, String senceno);
}